<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>sampleFile - OpenGrok cross reference for /sampleFile</title></head><body>
<script type="text/javascript">/* <![CDATA[ */
function get_sym_list(){return [["Variable","xv",[["bytes",44],["state",45]]],["Enum","xe",[["State",25]]],["Function","xf",[["b",108],["unescape",41],["unescape_carriage",128],["unescape_nl",118],["unescape_nothing_hex0",138],["unescape_nothing_hex1",143],["unescape_nothing_hex2",148],["unescape_nothing_simple",133],["unescape_nul",113],["unescape_tab",123]]]];} /* ]]> */</script><a class="l" name="1" href="#1">1</a><span class='fold-space'>&nbsp;</span><span class="c">// The MIT License (MIT)</span>
<a class="l" name="2" href="#2">2</a><span class='fold-space'>&nbsp;</span><span class="c">//</span>
<a class="l" name="3" href="#3">3</a><span class='fold-space'>&nbsp;</span><span class="c">// Copyright (c) 2015 Andrew Gallant</span>
<a class="l" name="4" href="#4">4</a><span class='fold-space'>&nbsp;</span><span class="c">//</span>
<a class="l" name="5" href="#5">5</a><span class='fold-space'>&nbsp;</span><span class="c">// Permission is hereby granted, free of charge, to any person obtaining a copy</span>
<a class="l" name="6" href="#6">6</a><span class='fold-space'>&nbsp;</span><span class="c">// of this software and associated documentation files (the &quot;Software&quot;), to deal</span>
<a class="l" name="7" href="#7">7</a><span class='fold-space'>&nbsp;</span><span class="c">// in the Software without restriction, including without limitation the rights</span>
<a class="l" name="8" href="#8">8</a><span class='fold-space'>&nbsp;</span><span class="c">// to use, copy, modify, merge, publish, distribute, sublicense, <a href="/source/s?path=and/">and</a>/<a href="/source/s?path=and/or">or</a> sell</span>
<a class="l" name="9" href="#9">9</a><span class='fold-space'>&nbsp;</span><span class="c">// copies of the Software, and to permit persons to whom the Software is</span>
<a class="hl" name="10" href="#10">10</a><span class='fold-space'>&nbsp;</span><span class="c">// furnished to do so, subject to the following conditions:</span>
<a class="l" name="11" href="#11">11</a><span class='fold-space'>&nbsp;</span><span class="c">//</span>
<a class="l" name="12" href="#12">12</a><span class='fold-space'>&nbsp;</span><span class="c">// The above copyright notice and this permission notice shall be included in</span>
<a class="l" name="13" href="#13">13</a><span class='fold-space'>&nbsp;</span><span class="c">// all copies or substantial portions of the Software.</span>
<a class="l" name="14" href="#14">14</a><span class='fold-space'>&nbsp;</span><span class="c">//</span>
<a class="l" name="15" href="#15">15</a><span class='fold-space'>&nbsp;</span><span class="c">// THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span>
<a class="l" name="16" href="#16">16</a><span class='fold-space'>&nbsp;</span><span class="c">// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span>
<a class="l" name="17" href="#17">17</a><span class='fold-space'>&nbsp;</span><span class="c">// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span>
<a class="l" name="18" href="#18">18</a><span class='fold-space'>&nbsp;</span><span class="c">// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span>
<a class="l" name="19" href="#19">19</a><span class='fold-space'>&nbsp;</span><span class="c">// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span>
<a class="hl" name="20" href="#20">20</a><span class='fold-space'>&nbsp;</span><span class="c">// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN</span>
<a class="l" name="21" href="#21">21</a><span class='fold-space'>&nbsp;</span><span class="c">// THE SOFTWARE.</span>
<a class="l" name="22" href="#22">22</a><span class='fold-space'>&nbsp;</span>
<a class="l" name="23" href="#23">23</a><span class='fold-space'>&nbsp;</span><span class="c">/// A single state in the state machine used by `unescape`.</span>
<a class="l" name="24" href="#24">24</a><span class='fold-space'>&nbsp;</span>#[<a href="/source/s?defs=derive" class="intelliWindow-symbol" data-definition-place="undefined-in-file">derive</a>(<a href="/source/s?defs=Clone" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Clone</a>, <a href="/source/s?defs=Copy" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Copy</a>, <a href="/source/s?defs=Eq" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Eq</a>, <a href="/source/s?defs=PartialEq" class="intelliWindow-symbol" data-definition-place="undefined-in-file">PartialEq</a>)]
<a class="l" name="25" href="#25">25</a><span class='fold-space'>&nbsp;</span><b>enum</b> <a class="xe" name="State"/><a href="/source/s?refs=State" class="xe intelliWindow-symbol" data-definition-place="def">State</a> &#123;
<a class="l" name="26" href="#26">26</a><span class='fold-space'>&nbsp;</span>    <span class="c">/// The state after seeing a `\`.</span>
<a class="l" name="27" href="#27">27</a><span class='fold-space'>&nbsp;</span>    <a class="xer" name="Escape"/><a href="/source/s?refs=Escape" class="xer intelliWindow-symbol" data-definition-place="def">Escape</a>,
<a class="l" name="28" href="#28">28</a><span class='fold-space'>&nbsp;</span>    <span class="c">/// The state after seeing a `\x`.</span>
<a class="l" name="29" href="#29">29</a><span class='fold-space'>&nbsp;</span>    <a class="xer" name="HexFirst"/><a href="/source/s?refs=HexFirst" class="xer intelliWindow-symbol" data-definition-place="def">HexFirst</a>,
<a class="hl" name="30" href="#30">30</a><span class='fold-space'>&nbsp;</span>    <span class="c">/// The state after seeing a `\x[0-9A-Fa-f]`.</span>
<a class="l" name="31" href="#31">31</a><span class='fold-space'>&nbsp;</span>    <a class="xer" name="HexSecond"/><a href="/source/s?refs=HexSecond" class="xer intelliWindow-symbol" data-definition-place="def">HexSecond</a>(<a href="/source/s?defs=char" class="intelliWindow-symbol" data-definition-place="undefined-in-file">char</a>),
<a class="l" name="32" href="#32">32</a><span class='fold-space'>&nbsp;</span>    <span class="c">/// Default state.</span>
<a class="l" name="33" href="#33">33</a><span class='fold-space'>&nbsp;</span>    <a class="xer" name="Literal"/><a href="/source/s?refs=Literal" class="xer intelliWindow-symbol" data-definition-place="def">Literal</a>,
<a class="l" name="34" href="#34">34</a><span class='fold-space'>&nbsp;</span>&#125;
<a class="l" name="35" href="#35">35</a><span class='fold-space'>&nbsp;</span>
<a class="l" name="36" href="#36">36</a><span class='fold-space'>&nbsp;</span><span class="c">/// Unescapes a string given on the command line. It supports a limited set of</span>
<a class="l" name="37" href="#37">37</a><span class='fold-space'>&nbsp;</span><span class="c">/// escape sequences:</span>
<a class="l" name="38" href="#38">38</a><span class='fold-space'>&nbsp;</span><span class="c">///</span>
<a class="l" name="39" href="#39">39</a><span class='fold-space'>&nbsp;</span><span class="c">/// * \t, \r and \n are mapped to their corresponding ASCII bytes.</span>
<a class="hl" name="40" href="#40">40</a><span class='fold-space'>&nbsp;</span><span class="c">/// * \xZZ hexadecimal escapes are mapped to their byte.</span>
<span id='scope_id_fc845eae' class='scope-head'><span class='scope-signature'>unescape(s: &amp;str) -&gt; Vec&lt;u8&gt;</span><a class="l" name="41" href="#41">41</a><a style='cursor:pointer;' onclick='fold(this.parentNode.id)' id='scope_id_fc845eae_fold_icon'><span class='fold-icon'>&nbsp;</span></a><b>pub</b> <b>fn</b> <a class="xf" name="unescape"/><a href="/source/s?refs=unescape" class="xf intelliWindow-symbol" data-definition-place="def">unescape</a>(<a href="/source/s?defs=s" class="intelliWindow-symbol" data-definition-place="undefined-in-file">s</a>: &amp;<a href="/source/s?defs=str" class="intelliWindow-symbol" data-definition-place="undefined-in-file">str</a>) -&gt; <a href="/source/s?defs=Vec" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Vec</a>&lt;<a class="xa" name="u8"/><a href="/source/s?refs=u8" class="xa intelliWindow-symbol" data-definition-place="def">u8</a>&gt; &#123;</span>
<span id='scope_id_fc845eae_fold' class='scope-body'><a class="l" name="42" href="#42">42</a><span class='fold-space'>&nbsp;</span>    <b>use</b> <b>self</b>::<a class="d intelliWindow-symbol" href="#State" data-definition-place="defined-in-file">State</a>::*&#59;
<a class="l" name="43" href="#43">43</a><span class='fold-space'>&nbsp;</span>
<a class="l" name="44" href="#44">44</a><span class='fold-space'>&nbsp;</span>    <b>let</b> <b>mut</b> <a class="xv" name="bytes"/><a href="/source/s?refs=bytes" class="xv intelliWindow-symbol" data-definition-place="def">bytes</a> = <a href="/source/s?defs=vec" class="intelliWindow-symbol" data-definition-place="undefined-in-file">vec</a>![]&#59;
<a class="l" name="45" href="#45">45</a><span class='fold-space'>&nbsp;</span>    <b>let</b> <b>mut</b> <a class="xv" name="state"/><a href="/source/s?refs=state" class="xv intelliWindow-symbol" data-definition-place="def">state</a> = <a class="d intelliWindow-symbol" href="#Literal" data-definition-place="defined-in-file">Literal</a>&#59;
<a class="l" name="46" href="#46">46</a><span class='fold-space'>&nbsp;</span>    <b>for</b> <a href="/source/s?defs=c" class="intelliWindow-symbol" data-definition-place="undefined-in-file">c</a> <b>in</b> <a href="/source/s?defs=s" class="intelliWindow-symbol" data-definition-place="undefined-in-file">s</a>.<a href="/source/s?defs=chars" class="intelliWindow-symbol" data-definition-place="undefined-in-file">chars</a>() &#123;
<a class="l" name="47" href="#47">47</a><span class='fold-space'>&nbsp;</span>        <b>match</b> <a class="d intelliWindow-symbol" href="#state" data-definition-place="defined-in-file">state</a> &#123;
<a class="l" name="48" href="#48">48</a><span class='fold-space'>&nbsp;</span>            <a class="d intelliWindow-symbol" href="#Escape" data-definition-place="defined-in-file">Escape</a> =&gt; &#123;
<a class="l" name="49" href="#49">49</a><span class='fold-space'>&nbsp;</span>                <b>match</b> <a href="/source/s?defs=c" class="intelliWindow-symbol" data-definition-place="undefined-in-file">c</a> &#123;
<a class="hl" name="50" href="#50">50</a><span class='fold-space'>&nbsp;</span>                    <span class="s">&apos;n&apos;</span> =&gt; &#123; <a class="d intelliWindow-symbol" href="#bytes" data-definition-place="defined-in-file">bytes</a>.<a href="/source/s?defs=push" class="intelliWindow-symbol" data-definition-place="undefined-in-file">push</a>(<span class="s">b&apos;\n&apos;</span>)&#59; <a class="d intelliWindow-symbol" href="#state" data-definition-place="defined-in-file">state</a> = <a class="d intelliWindow-symbol" href="#Literal" data-definition-place="defined-in-file">Literal</a>&#59; &#125;
<a class="l" name="51" href="#51">51</a><span class='fold-space'>&nbsp;</span>                    <span class="s">&apos;r&apos;</span> =&gt; &#123; <a class="d intelliWindow-symbol" href="#bytes" data-definition-place="defined-in-file">bytes</a>.<a href="/source/s?defs=push" class="intelliWindow-symbol" data-definition-place="undefined-in-file">push</a>(<span class="s">b&apos;\r&apos;</span>)&#59; <a class="d intelliWindow-symbol" href="#state" data-definition-place="defined-in-file">state</a> = <a class="d intelliWindow-symbol" href="#Literal" data-definition-place="defined-in-file">Literal</a>&#59; &#125;
<a class="l" name="52" href="#52">52</a><span class='fold-space'>&nbsp;</span>                    <span class="s">&apos;t&apos;</span> =&gt; &#123; <a class="d intelliWindow-symbol" href="#bytes" data-definition-place="defined-in-file">bytes</a>.<a href="/source/s?defs=push" class="intelliWindow-symbol" data-definition-place="undefined-in-file">push</a>(<span class="s">b&apos;\t&apos;</span>)&#59; <a class="d intelliWindow-symbol" href="#state" data-definition-place="defined-in-file">state</a> = <a class="d intelliWindow-symbol" href="#Literal" data-definition-place="defined-in-file">Literal</a>&#59; &#125;
<a class="l" name="53" href="#53">53</a><span class='fold-space'>&nbsp;</span>                    <span class="s">&apos;x&apos;</span> =&gt; &#123; <a class="d intelliWindow-symbol" href="#state" data-definition-place="defined-in-file">state</a> = <a class="d intelliWindow-symbol" href="#HexFirst" data-definition-place="defined-in-file">HexFirst</a>&#59; &#125;
<a class="l" name="54" href="#54">54</a><span class='fold-space'>&nbsp;</span>                    <a href="/source/s?defs=c" class="intelliWindow-symbol" data-definition-place="undefined-in-file">c</a> =&gt; &#123;
<a class="l" name="55" href="#55">55</a><span class='fold-space'>&nbsp;</span>                        <a class="d intelliWindow-symbol" href="#bytes" data-definition-place="defined-in-file">bytes</a>.<a href="/source/s?defs=extend" class="intelliWindow-symbol" data-definition-place="undefined-in-file">extend</a>(<a href="/source/s?defs=format" class="intelliWindow-symbol" data-definition-place="undefined-in-file">format</a>!(<span class="s">r&quot;\{}&quot;</span>, <a href="/source/s?defs=c" class="intelliWindow-symbol" data-definition-place="undefined-in-file">c</a>).<a href="/source/s?defs=into_bytes" class="intelliWindow-symbol" data-definition-place="undefined-in-file">into_bytes</a>())&#59;
<a class="l" name="56" href="#56">56</a><span class='fold-space'>&nbsp;</span>                        <a class="d intelliWindow-symbol" href="#state" data-definition-place="defined-in-file">state</a> = <a class="d intelliWindow-symbol" href="#Literal" data-definition-place="defined-in-file">Literal</a>&#59;
<a class="l" name="57" href="#57">57</a><span class='fold-space'>&nbsp;</span>                    &#125;
<a class="l" name="58" href="#58">58</a><span class='fold-space'>&nbsp;</span>                &#125;
<a class="l" name="59" href="#59">59</a><span class='fold-space'>&nbsp;</span>            &#125;
<a class="hl" name="60" href="#60">60</a><span class='fold-space'>&nbsp;</span>            <a class="d intelliWindow-symbol" href="#HexFirst" data-definition-place="defined-in-file">HexFirst</a> =&gt; &#123;
<a class="l" name="61" href="#61">61</a><span class='fold-space'>&nbsp;</span>                <b>match</b> <a href="/source/s?defs=c" class="intelliWindow-symbol" data-definition-place="undefined-in-file">c</a> &#123;
<a class="l" name="62" href="#62">62</a><span class='fold-space'>&nbsp;</span>                    <span class="s">&apos;0&apos;</span>...<span class="s">&apos;9&apos;</span> | <span class="s">&apos;A&apos;</span>...<span class="s">&apos;F&apos;</span> | <span class="s">&apos;a&apos;</span>...<span class="s">&apos;f&apos;</span> =&gt; &#123;
<a class="l" name="63" href="#63">63</a><span class='fold-space'>&nbsp;</span>                        <a class="d intelliWindow-symbol" href="#state" data-definition-place="defined-in-file">state</a> = <a class="d intelliWindow-symbol" href="#HexSecond" data-definition-place="defined-in-file">HexSecond</a>(<a href="/source/s?defs=c" class="intelliWindow-symbol" data-definition-place="undefined-in-file">c</a>)&#59;
<a class="l" name="64" href="#64">64</a><span class='fold-space'>&nbsp;</span>                    &#125;
<a class="l" name="65" href="#65">65</a><span class='fold-space'>&nbsp;</span>                    <a href="/source/s?defs=c" class="intelliWindow-symbol" data-definition-place="undefined-in-file">c</a> =&gt; &#123;
<a class="l" name="66" href="#66">66</a><span class='fold-space'>&nbsp;</span>                        <a class="d intelliWindow-symbol" href="#bytes" data-definition-place="defined-in-file">bytes</a>.<a href="/source/s?defs=extend" class="intelliWindow-symbol" data-definition-place="undefined-in-file">extend</a>(<a href="/source/s?defs=format" class="intelliWindow-symbol" data-definition-place="undefined-in-file">format</a>!(<span class="s">r&quot;\x{}&quot;</span>, <a href="/source/s?defs=c" class="intelliWindow-symbol" data-definition-place="undefined-in-file">c</a>).<a href="/source/s?defs=into_bytes" class="intelliWindow-symbol" data-definition-place="undefined-in-file">into_bytes</a>())&#59;
<a class="l" name="67" href="#67">67</a><span class='fold-space'>&nbsp;</span>                        <a class="d intelliWindow-symbol" href="#state" data-definition-place="defined-in-file">state</a> = <a class="d intelliWindow-symbol" href="#Literal" data-definition-place="defined-in-file">Literal</a>&#59;
<a class="l" name="68" href="#68">68</a><span class='fold-space'>&nbsp;</span>                    &#125;
<a class="l" name="69" href="#69">69</a><span class='fold-space'>&nbsp;</span>                &#125;
<a class="hl" name="70" href="#70">70</a><span class='fold-space'>&nbsp;</span>            &#125;
<a class="l" name="71" href="#71">71</a><span class='fold-space'>&nbsp;</span>            <a class="d intelliWindow-symbol" href="#HexSecond" data-definition-place="defined-in-file">HexSecond</a>(<a href="/source/s?defs=first" class="intelliWindow-symbol" data-definition-place="undefined-in-file">first</a>) =&gt; &#123;
<a class="l" name="72" href="#72">72</a><span class='fold-space'>&nbsp;</span>                <b>match</b> <a href="/source/s?defs=c" class="intelliWindow-symbol" data-definition-place="undefined-in-file">c</a> &#123;
<a class="l" name="73" href="#73">73</a><span class='fold-space'>&nbsp;</span>                    <span class="s">&apos;0&apos;</span>...<span class="s">&apos;9&apos;</span> | <span class="s">&apos;A&apos;</span>...<span class="s">&apos;F&apos;</span> | <span class="s">&apos;a&apos;</span>...<span class="s">&apos;f&apos;</span> =&gt; &#123;
<a class="l" name="74" href="#74">74</a><span class='fold-space'>&nbsp;</span>                        <b>let</b> <a href="/source/s?defs=ordinal" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ordinal</a> = <a href="/source/s?defs=format" class="intelliWindow-symbol" data-definition-place="undefined-in-file">format</a>!(<span class="s">&quot;{}{}&quot;</span>, <a href="/source/s?defs=first" class="intelliWindow-symbol" data-definition-place="undefined-in-file">first</a>, <a href="/source/s?defs=c" class="intelliWindow-symbol" data-definition-place="undefined-in-file">c</a>)&#59;
<a class="l" name="75" href="#75">75</a><span class='fold-space'>&nbsp;</span>                        <b>let</b> <a href="/source/s?defs=byte" class="intelliWindow-symbol" data-definition-place="undefined-in-file">byte</a> = <a href="/source/s?defs=u8" class="intelliWindow-symbol" data-definition-place="undefined-in-file">u8</a>::<a href="/source/s?defs=from_str_radix" class="intelliWindow-symbol" data-definition-place="undefined-in-file">from_str_radix</a>(&amp;<a href="/source/s?defs=ordinal" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ordinal</a>, <span class="n">16</span>).<a href="/source/s?defs=unwrap" class="intelliWindow-symbol" data-definition-place="undefined-in-file">unwrap</a>()&#59;
<a class="l" name="76" href="#76">76</a><span class='fold-space'>&nbsp;</span>                        <a class="d intelliWindow-symbol" href="#bytes" data-definition-place="defined-in-file">bytes</a>.<a href="/source/s?defs=push" class="intelliWindow-symbol" data-definition-place="undefined-in-file">push</a>(<a href="/source/s?defs=byte" class="intelliWindow-symbol" data-definition-place="undefined-in-file">byte</a>)&#59;
<a class="l" name="77" href="#77">77</a><span class='fold-space'>&nbsp;</span>                        <a class="d intelliWindow-symbol" href="#state" data-definition-place="defined-in-file">state</a> = <a class="d intelliWindow-symbol" href="#Literal" data-definition-place="defined-in-file">Literal</a>&#59;
<a class="l" name="78" href="#78">78</a><span class='fold-space'>&nbsp;</span>                        <a href="/source/s?defs=byte" class="intelliWindow-symbol" data-definition-place="undefined-in-file">byte</a> = <span class="n">0xFF</span> + <span class="n">0b1</span> - <span class="n">0o1u8</span>&#59;
<a class="l" name="79" href="#79">79</a><span class='fold-space'>&nbsp;</span>                    &#125;
<a class="hl" name="80" href="#80">80</a><span class='fold-space'>&nbsp;</span>                    <a href="/source/s?defs=c" class="intelliWindow-symbol" data-definition-place="undefined-in-file">c</a> =&gt; &#123;
<a class="l" name="81" href="#81">81</a><span class='fold-space'>&nbsp;</span>                        <b>let</b> <a href="/source/s?defs=original" class="intelliWindow-symbol" data-definition-place="undefined-in-file">original</a> = <a href="/source/s?defs=format" class="intelliWindow-symbol" data-definition-place="undefined-in-file">format</a>!(<span class="s">r&quot;\x{}{}&quot;</span>, <a href="/source/s?defs=first" class="intelliWindow-symbol" data-definition-place="undefined-in-file">first</a>, <a href="/source/s?defs=c" class="intelliWindow-symbol" data-definition-place="undefined-in-file">c</a>)&#59;
<a class="l" name="82" href="#82">82</a><span class='fold-space'>&nbsp;</span>                        <a class="d intelliWindow-symbol" href="#bytes" data-definition-place="defined-in-file">bytes</a>.<a href="/source/s?defs=extend" class="intelliWindow-symbol" data-definition-place="undefined-in-file">extend</a>(<a href="/source/s?defs=original" class="intelliWindow-symbol" data-definition-place="undefined-in-file">original</a>.<a href="/source/s?defs=into_bytes" class="intelliWindow-symbol" data-definition-place="undefined-in-file">into_bytes</a>())&#59;
<a class="l" name="83" href="#83">83</a><span class='fold-space'>&nbsp;</span>                        <a class="d intelliWindow-symbol" href="#state" data-definition-place="defined-in-file">state</a> = <a class="d intelliWindow-symbol" href="#Literal" data-definition-place="defined-in-file">Literal</a>&#59;
<a class="l" name="84" href="#84">84</a><span class='fold-space'>&nbsp;</span>                    &#125;
<a class="l" name="85" href="#85">85</a><span class='fold-space'>&nbsp;</span>                &#125;
<a class="l" name="86" href="#86">86</a><span class='fold-space'>&nbsp;</span>            &#125;
<a class="l" name="87" href="#87">87</a><span class='fold-space'>&nbsp;</span>            <a class="d intelliWindow-symbol" href="#Literal" data-definition-place="defined-in-file">Literal</a> =&gt; &#123;
<a class="l" name="88" href="#88">88</a><span class='fold-space'>&nbsp;</span>                <b>match</b> <a href="/source/s?defs=c" class="intelliWindow-symbol" data-definition-place="undefined-in-file">c</a> &#123;
<a class="l" name="89" href="#89">89</a><span class='fold-space'>&nbsp;</span>                    <span class="s">&apos;\\&apos;</span> =&gt; &#123; <a class="d intelliWindow-symbol" href="#state" data-definition-place="defined-in-file">state</a> = <a class="d intelliWindow-symbol" href="#Escape" data-definition-place="defined-in-file">Escape</a>&#59; &#125;
<a class="hl" name="90" href="#90">90</a><span class='fold-space'>&nbsp;</span>                    <a href="/source/s?defs=c" class="intelliWindow-symbol" data-definition-place="undefined-in-file">c</a> =&gt; &#123; <a class="d intelliWindow-symbol" href="#bytes" data-definition-place="defined-in-file">bytes</a>.<a href="/source/s?defs=extend" class="intelliWindow-symbol" data-definition-place="undefined-in-file">extend</a>(<a href="/source/s?defs=c" class="intelliWindow-symbol" data-definition-place="undefined-in-file">c</a>.<a href="/source/s?defs=to_string" class="intelliWindow-symbol" data-definition-place="undefined-in-file">to_string</a>().<a href="/source/s?defs=as_bytes" class="intelliWindow-symbol" data-definition-place="undefined-in-file">as_bytes</a>())&#59; &#125;
<a class="l" name="91" href="#91">91</a><span class='fold-space'>&nbsp;</span>                &#125;
<a class="l" name="92" href="#92">92</a><span class='fold-space'>&nbsp;</span>            &#125;
<a class="l" name="93" href="#93">93</a><span class='fold-space'>&nbsp;</span>        &#125;
<a class="l" name="94" href="#94">94</a><span class='fold-space'>&nbsp;</span>    &#125;
<a class="l" name="95" href="#95">95</a><span class='fold-space'>&nbsp;</span>    <b>match</b> <a class="d intelliWindow-symbol" href="#state" data-definition-place="defined-in-file">state</a> &#123;
<a class="l" name="96" href="#96">96</a><span class='fold-space'>&nbsp;</span>        <a class="d intelliWindow-symbol" href="#Escape" data-definition-place="defined-in-file">Escape</a> =&gt; <a class="d intelliWindow-symbol" href="#bytes" data-definition-place="defined-in-file">bytes</a>.<a href="/source/s?defs=push" class="intelliWindow-symbol" data-definition-place="undefined-in-file">push</a>(<span class="s">b&apos;\\&apos;</span>),
<a class="l" name="97" href="#97">97</a><span class='fold-space'>&nbsp;</span>        <a class="d intelliWindow-symbol" href="#HexFirst" data-definition-place="defined-in-file">HexFirst</a> =&gt; <a class="d intelliWindow-symbol" href="#bytes" data-definition-place="defined-in-file">bytes</a>.<a href="/source/s?defs=extend" class="intelliWindow-symbol" data-definition-place="undefined-in-file">extend</a>(<span class="s">b&quot;\\x&quot;</span>),
<a class="l" name="98" href="#98">98</a><span class='fold-space'>&nbsp;</span>        <a class="d intelliWindow-symbol" href="#HexSecond" data-definition-place="defined-in-file">HexSecond</a>(<a href="/source/s?defs=c" class="intelliWindow-symbol" data-definition-place="undefined-in-file">c</a>) =&gt; <a class="d intelliWindow-symbol" href="#bytes" data-definition-place="defined-in-file">bytes</a>.<a href="/source/s?defs=extend" class="intelliWindow-symbol" data-definition-place="undefined-in-file">extend</a>(<a href="/source/s?defs=format" class="intelliWindow-symbol" data-definition-place="undefined-in-file">format</a>!(<span class="s">&quot;\\x{}&quot;</span>, <a href="/source/s?defs=c" class="intelliWindow-symbol" data-definition-place="undefined-in-file">c</a>).<a href="/source/s?defs=into_bytes" class="intelliWindow-symbol" data-definition-place="undefined-in-file">into_bytes</a>()),
<a class="l" name="99" href="#99">99</a><span class='fold-space'>&nbsp;</span>        <a class="d intelliWindow-symbol" href="#Literal" data-definition-place="defined-in-file">Literal</a> =&gt; &#123;&#125;
<a class="hl" name="100" href="#100">100</a><span class='fold-space'>&nbsp;</span>    &#125;
<a class="l" name="101" href="#101">101</a><span class='fold-space'>&nbsp;</span>    <a class="d intelliWindow-symbol" href="#bytes" data-definition-place="defined-in-file">bytes</a>
<a class="l" name="102" href="#102">102</a><span class='fold-space'>&nbsp;</span>&#125;
</span><a class="l" name="103" href="#103">103</a><span class='fold-space'>&nbsp;</span>
<a class="l" name="104" href="#104">104</a><span class='fold-space'>&nbsp;</span>#[<a href="/source/s?defs=cfg" class="intelliWindow-symbol" data-definition-place="undefined-in-file">cfg</a>(<a href="/source/s?defs=test" class="intelliWindow-symbol" data-definition-place="undefined-in-file">test</a>)]
<a class="l" name="105" href="#105">105</a><span class='fold-space'>&nbsp;</span><b>mod</b> <a class="d" name="tests"/><a href="/source/s?refs=tests" class="d intelliWindow-symbol" data-definition-place="def">tests</a> &#123;
<a class="l" name="106" href="#106">106</a><span class='fold-space'>&nbsp;</span>    <b>use</b> <b>super</b>::<a class="d intelliWindow-symbol" href="#unescape" data-definition-place="defined-in-file">unescape</a>&#59;
<a class="l" name="107" href="#107">107</a><span class='fold-space'>&nbsp;</span>
<span id='scope_id_12399a19' class='scope-head'><span class='scope-signature'>b(bytes: &amp;&apos;static [u8]) -&gt; Vec&lt;u8&gt;</span><a class="l" name="108" href="#108">108</a><a style='cursor:pointer;' onclick='fold(this.parentNode.id)' id='scope_id_12399a19_fold_icon'><span class='fold-icon'>&nbsp;</span></a>    <b>fn</b> <a class="xf" name="b"/><a href="/source/s?refs=b" class="xf intelliWindow-symbol" data-definition-place="def">b</a>(<a class="d intelliWindow-symbol" href="#bytes" data-definition-place="defined-in-file">bytes</a>: &amp;&apos;<b>static</b> [<a class="xa" name="u8"/><a href="/source/s?refs=u8" class="xa intelliWindow-symbol" data-definition-place="def">u8</a>]) -&gt; <a href="/source/s?defs=Vec" class="intelliWindow-symbol" data-definition-place="undefined-in-file">Vec</a>&lt;<a href="/source/s?defs=u8" class="intelliWindow-symbol" data-definition-place="undefined-in-file">u8</a>&gt; &#123;</span>
<span id='scope_id_12399a19_fold' class='scope-body'><a class="l" name="109" href="#109">109</a><span class='fold-space'>&nbsp;</span>        <a class="d intelliWindow-symbol" href="#bytes" data-definition-place="defined-in-file">bytes</a>.<a href="/source/s?defs=to_vec" class="intelliWindow-symbol" data-definition-place="undefined-in-file">to_vec</a>()
<a class="hl" name="110" href="#110">110</a><span class='fold-space'>&nbsp;</span>    &#125;
</span><a class="l" name="111" href="#111">111</a><span class='fold-space'>&nbsp;</span>
<a class="l" name="112" href="#112">112</a><span class='fold-space'>&nbsp;</span>    #[<a href="/source/s?defs=test" class="intelliWindow-symbol" data-definition-place="undefined-in-file">test</a>]
<span id='scope_id_c6b0b3f4' class='scope-head'><span class='scope-signature'>unescape_nul()</span><a class="l" name="113" href="#113">113</a><a style='cursor:pointer;' onclick='fold(this.parentNode.id)' id='scope_id_c6b0b3f4_fold_icon'><span class='fold-icon'>&nbsp;</span></a>    <b>fn</b> <a class="xf" name="unescape_nul"/><a href="/source/s?refs=unescape_nul" class="xf intelliWindow-symbol" data-definition-place="def">unescape_nul</a>() &#123;</span>
<span id='scope_id_c6b0b3f4_fold' class='scope-body'><a class="l" name="114" href="#114">114</a><span class='fold-space'>&nbsp;</span>        <a href="/source/s?defs=assert_eq" class="intelliWindow-symbol" data-definition-place="undefined-in-file">assert_eq</a>!(<a class="d intelliWindow-symbol" href="#b" data-definition-place="defined-in-file">b</a>(<span class="s">b&quot;\x00&quot;</span>), <a class="d intelliWindow-symbol" href="#unescape" data-definition-place="defined-in-file">unescape</a>(<span class="s">r&quot;\x00&quot;</span>))&#59;
<a class="l" name="115" href="#115">115</a><span class='fold-space'>&nbsp;</span>    &#125;
</span><a class="l" name="116" href="#116">116</a><span class='fold-space'>&nbsp;</span>
<a class="l" name="117" href="#117">117</a><span class='fold-space'>&nbsp;</span>    #[<a href="/source/s?defs=test" class="intelliWindow-symbol" data-definition-place="undefined-in-file">test</a>]
<span id='scope_id_1d28ecec' class='scope-head'><span class='scope-signature'>unescape_nl()</span><a class="l" name="118" href="#118">118</a><a style='cursor:pointer;' onclick='fold(this.parentNode.id)' id='scope_id_1d28ecec_fold_icon'><span class='fold-icon'>&nbsp;</span></a>    <b>fn</b> <a class="xf" name="unescape_nl"/><a href="/source/s?refs=unescape_nl" class="xf intelliWindow-symbol" data-definition-place="def">unescape_nl</a>() &#123;</span>
<span id='scope_id_1d28ecec_fold' class='scope-body'><a class="l" name="119" href="#119">119</a><span class='fold-space'>&nbsp;</span>        <a href="/source/s?defs=assert_eq" class="intelliWindow-symbol" data-definition-place="undefined-in-file">assert_eq</a>!(<a class="d intelliWindow-symbol" href="#b" data-definition-place="defined-in-file">b</a>(<span class="s">b&quot;\n&quot;</span>), <a class="d intelliWindow-symbol" href="#unescape" data-definition-place="defined-in-file">unescape</a>(<span class="s">r&quot;\n&quot;</span>))&#59;
<a class="hl" name="120" href="#120">120</a><span class='fold-space'>&nbsp;</span>    &#125;
</span><a class="l" name="121" href="#121">121</a><span class='fold-space'>&nbsp;</span>
<a class="l" name="122" href="#122">122</a><span class='fold-space'>&nbsp;</span>    #[<a href="/source/s?defs=test" class="intelliWindow-symbol" data-definition-place="undefined-in-file">test</a>]
<span id='scope_id_a88de1e3' class='scope-head'><span class='scope-signature'>unescape_tab()</span><a class="l" name="123" href="#123">123</a><a style='cursor:pointer;' onclick='fold(this.parentNode.id)' id='scope_id_a88de1e3_fold_icon'><span class='fold-icon'>&nbsp;</span></a>    <b>fn</b> <a class="xf" name="unescape_tab"/><a href="/source/s?refs=unescape_tab" class="xf intelliWindow-symbol" data-definition-place="def">unescape_tab</a>() &#123;</span>
<span id='scope_id_a88de1e3_fold' class='scope-body'><a class="l" name="124" href="#124">124</a><span class='fold-space'>&nbsp;</span>        <a href="/source/s?defs=assert_eq" class="intelliWindow-symbol" data-definition-place="undefined-in-file">assert_eq</a>!(<a class="d intelliWindow-symbol" href="#b" data-definition-place="defined-in-file">b</a>(<span class="s">b&quot;\t&quot;</span>), <a class="d intelliWindow-symbol" href="#unescape" data-definition-place="defined-in-file">unescape</a>(<span class="s">r&quot;\t&quot;</span>))&#59;
<a class="l" name="125" href="#125">125</a><span class='fold-space'>&nbsp;</span>    &#125;
</span><a class="l" name="126" href="#126">126</a><span class='fold-space'>&nbsp;</span>
<a class="l" name="127" href="#127">127</a><span class='fold-space'>&nbsp;</span>    #[<a href="/source/s?defs=test" class="intelliWindow-symbol" data-definition-place="undefined-in-file">test</a>]
<span id='scope_id_a5f8d183' class='scope-head'><span class='scope-signature'>unescape_carriage()</span><a class="l" name="128" href="#128">128</a><a style='cursor:pointer;' onclick='fold(this.parentNode.id)' id='scope_id_a5f8d183_fold_icon'><span class='fold-icon'>&nbsp;</span></a>    <b>fn</b> <a class="xf" name="unescape_carriage"/><a href="/source/s?refs=unescape_carriage" class="xf intelliWindow-symbol" data-definition-place="def">unescape_carriage</a>() &#123;</span>
<span id='scope_id_a5f8d183_fold' class='scope-body'><a class="l" name="129" href="#129">129</a><span class='fold-space'>&nbsp;</span>        <a href="/source/s?defs=assert_eq" class="intelliWindow-symbol" data-definition-place="undefined-in-file">assert_eq</a>!(<a class="d intelliWindow-symbol" href="#b" data-definition-place="defined-in-file">b</a>(<span class="s">b&quot;\r&quot;</span>), <a class="d intelliWindow-symbol" href="#unescape" data-definition-place="defined-in-file">unescape</a>(<span class="s">r&quot;\r&quot;</span>))&#59;
<a class="hl" name="130" href="#130">130</a><span class='fold-space'>&nbsp;</span>    &#125;
</span><a class="l" name="131" href="#131">131</a><span class='fold-space'>&nbsp;</span>
<a class="l" name="132" href="#132">132</a><span class='fold-space'>&nbsp;</span>    #[<a href="/source/s?defs=test" class="intelliWindow-symbol" data-definition-place="undefined-in-file">test</a>]
<span id='scope_id_11030a79' class='scope-head'><span class='scope-signature'>unescape_nothing_simple()</span><a class="l" name="133" href="#133">133</a><a style='cursor:pointer;' onclick='fold(this.parentNode.id)' id='scope_id_11030a79_fold_icon'><span class='fold-icon'>&nbsp;</span></a>    <b>fn</b> <a class="xf" name="unescape_nothing_simple"/><a href="/source/s?refs=unescape_nothing_simple" class="xf intelliWindow-symbol" data-definition-place="def">unescape_nothing_simple</a>() &#123;</span>
<span id='scope_id_11030a79_fold' class='scope-body'><a class="l" name="134" href="#134">134</a><span class='fold-space'>&nbsp;</span>        <a href="/source/s?defs=assert_eq" class="intelliWindow-symbol" data-definition-place="undefined-in-file">assert_eq</a>!(<a class="d intelliWindow-symbol" href="#b" data-definition-place="defined-in-file">b</a>(<span class="s">b&quot;\\a&quot;</span>), <a class="d intelliWindow-symbol" href="#unescape" data-definition-place="defined-in-file">unescape</a>(<span class="s">r&quot;\a&quot;</span>))&#59;
<a class="l" name="135" href="#135">135</a><span class='fold-space'>&nbsp;</span>    &#125;
</span><a class="l" name="136" href="#136">136</a><span class='fold-space'>&nbsp;</span>
<a class="l" name="137" href="#137">137</a><span class='fold-space'>&nbsp;</span>    #[<a href="/source/s?defs=test" class="intelliWindow-symbol" data-definition-place="undefined-in-file">test</a>]
<span id='scope_id_af842857' class='scope-head'><span class='scope-signature'>unescape_nothing_hex0()</span><a class="l" name="138" href="#138">138</a><a style='cursor:pointer;' onclick='fold(this.parentNode.id)' id='scope_id_af842857_fold_icon'><span class='fold-icon'>&nbsp;</span></a>    <b>fn</b> <a class="xf" name="unescape_nothing_hex0"/><a href="/source/s?refs=unescape_nothing_hex0" class="xf intelliWindow-symbol" data-definition-place="def">unescape_nothing_hex0</a>() &#123;</span>
<span id='scope_id_af842857_fold' class='scope-body'><a class="l" name="139" href="#139">139</a><span class='fold-space'>&nbsp;</span>        <a href="/source/s?defs=assert_eq" class="intelliWindow-symbol" data-definition-place="undefined-in-file">assert_eq</a>!(<a class="d intelliWindow-symbol" href="#b" data-definition-place="defined-in-file">b</a>(<span class="s">b&quot;\\x&quot;</span>), <a class="d intelliWindow-symbol" href="#unescape" data-definition-place="defined-in-file">unescape</a>(<span class="s">r&quot;\x&quot;</span>))&#59;
<a class="hl" name="140" href="#140">140</a><span class='fold-space'>&nbsp;</span>    &#125;
</span><a class="l" name="141" href="#141">141</a><span class='fold-space'>&nbsp;</span>
<a class="l" name="142" href="#142">142</a><span class='fold-space'>&nbsp;</span>    #[<a href="/source/s?defs=test" class="intelliWindow-symbol" data-definition-place="undefined-in-file">test</a>]
<span id='scope_id_47acaebe' class='scope-head'><span class='scope-signature'>unescape_nothing_hex1()</span><a class="l" name="143" href="#143">143</a><a style='cursor:pointer;' onclick='fold(this.parentNode.id)' id='scope_id_47acaebe_fold_icon'><span class='fold-icon'>&nbsp;</span></a>    <b>fn</b> <a class="xf" name="unescape_nothing_hex1"/><a href="/source/s?refs=unescape_nothing_hex1" class="xf intelliWindow-symbol" data-definition-place="def">unescape_nothing_hex1</a>() &#123;</span>
<span id='scope_id_47acaebe_fold' class='scope-body'><a class="l" name="144" href="#144">144</a><span class='fold-space'>&nbsp;</span>        <a href="/source/s?defs=assert_eq" class="intelliWindow-symbol" data-definition-place="undefined-in-file">assert_eq</a>!(<a class="d intelliWindow-symbol" href="#b" data-definition-place="defined-in-file">b</a>(<span class="s">b&quot;\\xz&quot;</span>), <a class="d intelliWindow-symbol" href="#unescape" data-definition-place="defined-in-file">unescape</a>(<span class="s">r&quot;\xz&quot;</span>))&#59;
<a class="l" name="145" href="#145">145</a><span class='fold-space'>&nbsp;</span>    &#125;
</span><a class="l" name="146" href="#146">146</a><span class='fold-space'>&nbsp;</span>
<a class="l" name="147" href="#147">147</a><span class='fold-space'>&nbsp;</span>    #[<a href="/source/s?defs=test" class="intelliWindow-symbol" data-definition-place="undefined-in-file">test</a>]
<span id='scope_id_33b47cda' class='scope-head'><span class='scope-signature'>unescape_nothing_hex2()</span><a class="l" name="148" href="#148">148</a><a style='cursor:pointer;' onclick='fold(this.parentNode.id)' id='scope_id_33b47cda_fold_icon'><span class='fold-icon'>&nbsp;</span></a>    <b>fn</b> <a class="xf" name="unescape_nothing_hex2"/><a href="/source/s?refs=unescape_nothing_hex2" class="xf intelliWindow-symbol" data-definition-place="def">unescape_nothing_hex2</a>() &#123;</span>
<span id='scope_id_33b47cda_fold' class='scope-body'><a class="l" name="149" href="#149">149</a><span class='fold-space'>&nbsp;</span>        <a href="/source/s?defs=assert_eq" class="intelliWindow-symbol" data-definition-place="undefined-in-file">assert_eq</a>!(<a class="d intelliWindow-symbol" href="#b" data-definition-place="defined-in-file">b</a>(<span class="s">b&quot;\\xzz&quot;</span>), <a class="d intelliWindow-symbol" href="#unescape" data-definition-place="defined-in-file">unescape</a>(<span class="s">r##&quot;\xzz&quot;##</span>##))&#59;
<a class="hl" name="150" href="#150">150</a><span class='fold-space'>&nbsp;</span>    &#125;
</span><a class="l" name="151" href="#151">151</a><span class='fold-space'>&nbsp;</span>
<a class="l" name="152" href="#152">152</a><span class='fold-space'>&nbsp;</span>    <span class="c">/*   /* */  /** */
<a class="l" name="153" href="#153">153</a><span class='fold-space'>&nbsp;</span>    pub mod dummy_item {}  /*! */  */</span>
<a class="l" name="154" href="#154">154</a><span class='fold-space'>&nbsp;</span>&#125;
<a class="l" name="155" href="#155">155</a><span class='fold-space'>&nbsp;</span><span class="c">/*<a href="http://example.com">http://example.com</a>*/</span>
<a class="l" name="156" href="#156">156</a><span class='fold-space'>&nbsp;</span></body>
</html>
